3.560 \(\int \frac{A+B x^2}{\sqrt{a+b x^2}} \, dx\)

Optimal. Leaf size=58 \[ \frac{(2 A b-a B) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}+\frac{B x \sqrt{a+b x^2}}{2 b} \]

[Out]

(B*x*Sqrt[a + b*x^2])/(2*b) + ((2*A*b - a*B)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*b^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.017414, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {388, 217, 206} \[ \frac{(2 A b-a B) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}+\frac{B x \sqrt{a+b x^2}}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/Sqrt[a + b*x^2],x]

[Out]

(B*x*Sqrt[a + b*x^2])/(2*b) + ((2*A*b - a*B)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*b^(3/2))

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{A+B x^2}{\sqrt{a+b x^2}} \, dx &=\frac{B x \sqrt{a+b x^2}}{2 b}-\frac{(-2 A b+a B) \int \frac{1}{\sqrt{a+b x^2}} \, dx}{2 b}\\ &=\frac{B x \sqrt{a+b x^2}}{2 b}-\frac{(-2 A b+a B) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )}{2 b}\\ &=\frac{B x \sqrt{a+b x^2}}{2 b}+\frac{(2 A b-a B) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.0172863, size = 57, normalized size = 0.98 \[ \frac{B x \sqrt{a+b x^2}}{2 b}-\frac{(a B-2 A b) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/Sqrt[a + b*x^2],x]

[Out]

(B*x*Sqrt[a + b*x^2])/(2*b) - ((-2*A*b + a*B)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*b^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 62, normalized size = 1.1 \begin{align*}{\frac{Bx}{2\,b}\sqrt{b{x}^{2}+a}}-{\frac{Ba}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){b}^{-{\frac{3}{2}}}}+{A\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/(b*x^2+a)^(1/2),x)

[Out]

1/2*B*x*(b*x^2+a)^(1/2)/b-1/2*B*a/b^(3/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))+A*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2
)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.55744, size = 275, normalized size = 4.74 \begin{align*} \left [\frac{2 \, \sqrt{b x^{2} + a} B b x -{\left (B a - 2 \, A b\right )} \sqrt{b} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right )}{4 \, b^{2}}, \frac{\sqrt{b x^{2} + a} B b x +{\left (B a - 2 \, A b\right )} \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right )}{2 \, b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/4*(2*sqrt(b*x^2 + a)*B*b*x - (B*a - 2*A*b)*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a))/b^2, 1/
2*(sqrt(b*x^2 + a)*B*b*x + (B*a - 2*A*b)*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)))/b^2]

________________________________________________________________________________________

Sympy [A]  time = 2.49024, size = 126, normalized size = 2.17 \begin{align*} A \left (\begin{cases} \frac{\sqrt{- \frac{a}{b}} \operatorname{asin}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b < 0 \\\frac{\sqrt{\frac{a}{b}} \operatorname{asinh}{\left (x \sqrt{\frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b > 0 \\\frac{\sqrt{- \frac{a}{b}} \operatorname{acosh}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{- a}} & \text{for}\: b > 0 \wedge a < 0 \end{cases}\right ) + \frac{B \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2 b} - \frac{B a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 b^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/(b*x**2+a)**(1/2),x)

[Out]

A*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), (a > 0) & (b < 0)), (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a),
 (a > 0) & (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0) & (a < 0))) + B*sqrt(a)*x*sqrt(1 + b*x*
*2/a)/(2*b) - B*a*asinh(sqrt(b)*x/sqrt(a))/(2*b**(3/2))

________________________________________________________________________________________

Giac [A]  time = 1.11632, size = 65, normalized size = 1.12 \begin{align*} \frac{\sqrt{b x^{2} + a} B x}{2 \, b} + \frac{{\left (B a - 2 \, A b\right )} \log \left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{2 \, b^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(b*x^2 + a)*B*x/b + 1/2*(B*a - 2*A*b)*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a)))/b^(3/2)